<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SystemUser>" %>
<%@ Import Namespace="TeamCommunitySolution.Domain.DataLayer.Base"%>
<table width="100%">
    <tr>
        <th>
            Name
        </th>
        <th>
            Founded
        </th>
        <th>
            Actions
        </th>
    </tr>
    <% foreach (var item in Model.TeamRequestReceivedList)
       { %>
    <tr>
        <td>
            <%= Html.Encode(item.TeamToJoin.Name) %>
        </td>
        <td>
            <%= Html.Encode(item.PersonalMessage)%>
        </td>
        <td>
            <%= Ajax.ActionLink("Accept", "AcceptRequest", "Team", new{ request=item.Id, id=Model.Id }, new AjaxOptions{UpdateTargetId = "invitesForm"})%>
        </td>
    </tr>
    <% } %>
</table>